<?php require VIEW_ROOT.'/common/header.php'?>

<div class="info">
	共有 <?php echo $log_count?> 条，当前显示<?php echo count($res)?>条。
	按时间
	<a href="./?m=logs&a=list&where=1">[全部]</a>
	<a href="./?m=logs&a=list&where=create_time>=<?php echo strtotime(date('Y-m-d'))-86400*4?>">[近5天]</a>
	<a href="./?m=logs&a=list&where=create_time>=<?php echo strtotime(date('Y-m-d'))-86400*9?>">[近10天]</a>
	<a href="./?m=logs&a=list&where=create_time>=<?php echo strtotime(date('Y-m-d'))-86400*19?> and create_time<<?php echo strtotime(date('Y-m-d'))-86400*9?>">[后10天]</a>
	按模块
	<a href="./?m=logs&a=list&where=model='finance'">[Finance]</a>
	<a href="./?m=logs&a=list&where=model='notes'">[Notes]</a>
	<a href="./?m=logs&a=list&where=model='system'">[System]</a>
	<a href="./?m=logs&a=list&where=model='auth'">[Auth]</a>
</div>

<table>
	<tr>
		<th width="20">ID</th>
		<th width="155">时间</th>
		<th width="105">IP</th>
		<th width="60">Model</th>
		<th width="60">Action</th>
		<th>日志内容</th>
	</tr>
	<?php foreach ($res as $row) {?>
	<tr>
		<td><?php echo $row['log_id']?></td>
		<td><?php echo date('Y-m-d D H:i:s', $row['create_time'])?></td>
		<td><a href="http://www.baidu.com/baidu?word=<?php echo $row['ip']?>" target="_blank"><?php echo $row['ip']?></a></td>
		<td><?php echo $row['model']?></td>
		<td><?php echo $row['action']?></td>
		<td class="frm"><?php echo htmlspecialchars($row['body'])?></td>
	</tr>
	<?php }?>
</table>
<?php require VIEW_ROOT.'/common/footer.php'?>